import request from 'utils/request'

// 上传
export const uploadFile = (data, model) => {
  return request({
    url: '/file',
    method: 'post',
    data
  })
}

export const getVocationalLink = () => {
  return request({
    url: '/vocational',
    method: 'get',
    params: {
      status: 'up',
      page: 0,
      pageSize: 1000000
    }
  })
}

export const getNewsLink = () => {
  return request({
    url: '/information',
    method: 'get',
    params: {
      status: 'up',
      page: 0,
      pageSize: 1000000
    }
  })
}

export const getNewsTypeLink = () => {
  return request({
    url: '/informationType/bySingle',
    method: 'get',
    params: {
      'single': false
    }
  })
}

export const getAllNewsTypeLink = () => {
  return request({
    url: '/informationType/all',
    method: 'get',
    params: {
      'status': 'up'
    }
  })
}

export const getBasicConfigLink = () => {
  return request({
    url: '/props/all',
    method: 'get',
    params: {
      status: 'up'
    }
  })
}

export const getAlbumsLink = () => {
  return request({
    url: '/album/all',
    method: 'get',
    params: {
      status: 'up'
    }
  })
}

export const getNewpageLink = (data) => {
  return request({
    url: '/mall/others/all',
    method: 'get',
    params: data
  })
}
